import java.util.*;

class ArraysUtil {
	public static void main(String[] args) {
		double[] arr={10.1, 100.3, 20.5, 80, 60, 52.1};
		printArr(arr);
		System.out.println();

		Arrays.sort(arr);
		printArr(arr);
		System.out.println();

		int foundIndex=Arrays.binarySearch(arr, 20.5);
		System.out.println("found index: " + foundIndex);

		int[] intArr1={10,20,30,40,50};
		System.out.println(Arrays.toString(intArr1));

		int[] intArr2=new int[10];
		Arrays.fill(intArr2,2,4,9);
		System.out.println(Arrays.toString(intArr2));
	}

	private static void printArr(double[] values) {
		for(double e:values) {
			System.out.println(e);
		}
	}
}
